<template>
  <div class="userInfo flex">
    <div class="avatar">
      <img :src="item?.avatar" alt="avatar" />
      <progressbar :schedule="item.duties.schedule" />
    </div>
    <span class="username">{{ item.nickName }}</span>
    <span class="duties">{{ item?.duties.name }}</span>
    <el-tag>{{ item.duties.level }}</el-tag>
  </div>
</template>

<script setup lang="ts">
import { IUserInfo } from '@/types/user';
import progressbar from '@/components/progressbar/index.vue';
const { item } = defineProps<{ item: IUserInfo }>()


</script>

<style lang="scss" scoped>
.userInfo {

  flex-direction: column;
  background-color: #F4F9FD;
  justify-content: center;
  align-items: center;
  width: max-content;
  margin: 10px 10px;
  padding: 10px;
  gap: 10px;
  border-radius: 10px;
  font-size: 14px;
}



.avatar {
  position: relative;
  overflow: hidden;
  width: 52px;
  height: 52px;
  border-radius: 50%;


  >img {
    position: absolute;
    width: 42px;
    height: 42px;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    overflow: hidden;
  }
}

.duties {
  font-size: 14px;
  color: #0A1629;
}
</style>